package com.rul.mars.user.service;

import com.rul.mars.common.api.CommonResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.Map;

/**
 * 认证服务远程调用
 *
 * @author RuL
 */
@FeignClient("mars-auth")
public interface AuthService {

    /**
     * 远程调用获取Token信息
     *
     * @param parameters 获取Token所需的基本参数
     * @return Token信息
     */
    @PostMapping(value = "/oauth/token")
    CommonResult getAccessToken(@RequestParam Map<String, String> parameters);
}
